home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Make / source / NMakefile < prev    next >
Encoding:
Makefile  |  1997-08-27  |  5.1 KB  |  142 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build_w32.bat' instead.
  3. #
  4. # Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. #
  7. # GNU Make is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # GNU Make is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with GNU Make; see the file COPYING.  If not, write to
  19. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. #
  22. #       NMakefile for GNU Make
  23. #
  24.  
  25. LINK = link
  26. CC = cl
  27.  
  28. OUTDIR=.
  29. MAKEFILE=NMakefile
  30. SUBPROC_MAKEFILE=NMakefile
  31.  
  32. CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES
  33. CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
  34. CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
  35.  
  36. LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
  37.     /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
  38.     /OUT:WinDebug/make.exe /DEBUG
  39. LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
  40.     /INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
  41.  
  42. all: config.h subproc Release Debug
  43.  
  44. #
  45. # Make sure we build the subproc library first. It has it's own
  46. # makefile. To be portable to Windows 95, we put the instructions
  47. # on how to build the library into a batch file. On NT, we could
  48. # simply have done foo && bar && dog, but this doesn't port.
  49. #
  50. subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
  51.  
  52. w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib:
  53.     subproc.bat $(SUBPROC_MAKEFILE)
  54.  
  55. config.h: config.h.W32
  56.     copy $? $@
  57.  
  58. Release:
  59.     nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
  60. Debug:
  61.     nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
  62.  
  63. clean:
  64.     rmdir /s /q WinDebug WinRel
  65.     rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel
  66.     erase config.h
  67.  
  68. $(OUTDIR):
  69.     if not exist .\$@\nul mkdir .\$@
  70.  
  71. LIBS = kernel32.lib user32.lib advapi32.lib
  72.  
  73. OBJS = \
  74.     $(OUTDIR)/ar.obj \
  75.     $(OUTDIR)/arscan.obj \
  76.     $(OUTDIR)/commands.obj \
  77.     $(OUTDIR)/default.obj \
  78.     $(OUTDIR)/dir.obj \
  79.     $(OUTDIR)/expand.obj \
  80.     $(OUTDIR)/file.obj \
  81.     $(OUTDIR)/function.obj \
  82.     $(OUTDIR)/getloadavg.obj \
  83.     $(OUTDIR)/getopt.obj \
  84.     $(OUTDIR)/getopt1.obj \
  85.     $(OUTDIR)/implicit.obj \
  86.     $(OUTDIR)/job.obj \
  87.     $(OUTDIR)/main.obj \
  88.     $(OUTDIR)/misc.obj \
  89.     $(OUTDIR)/read.obj \
  90.     $(OUTDIR)/remake.obj \
  91.     $(OUTDIR)/remote-stub.obj \
  92.     $(OUTDIR)/rule.obj \
  93.     $(OUTDIR)/signame.obj \
  94.     $(OUTDIR)/variable.obj \
  95.     $(OUTDIR)/version.obj \
  96.     $(OUTDIR)/vpath.obj \
  97.     $(OUTDIR)/glob.obj \
  98.     $(OUTDIR)/fnmatch.obj \
  99.     $(OUTDIR)/dirent.obj \
  100.     $(OUTDIR)/pathstuff.obj
  101.  
  102. $(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
  103.     $(LINK) @<<
  104.         $(LDFLAGS) $(LIBS) $(OBJS)
  105. <<
  106.  
  107. .c{$(OUTDIR)}.obj:
  108.     $(CC) $(CFLAGS) /c $<
  109.     
  110. $(OUTDIR)/ar.obj : ar.c make.h filedef.h dep.h
  111. $(OUTDIR)/arscan.obj : arscan.c make.h
  112. $(OUTDIR)/commands.obj : commands.c
  113. $(OUTDIR)/default.obj : default.c make.h rule.h dep.h filedef.h job.h commands.h variable.h
  114. $(OUTDIR)/dir.obj :  dir.c make.h
  115. $(OUTDIR)/expand.obj : expand.c make.h filedef.h job.h commands.h variable.h
  116. $(OUTDIR)/file.obj : file.c make.h dep.h filedef.h job.h commands.h variable.h
  117. $(OUTDIR)/function.obj : function.c make.h filedef.h variable.h dep.h job.h commands.h
  118. $(OUTDIR)/getloadavg.obj : getloadavg.c
  119. $(OUTDIR)/getopt.obj : getopt.c
  120. $(OUTDIR)/getopt1.obj : getopt1.c getopt.h
  121. $(OUTDIR)/implicit.obj : implicit.c make.h rule.h dep.h filedef.h
  122. $(OUTDIR)/job.obj : job.c make.h job.h filedef.h commands.h variable.h
  123. $(OUTDIR)/main.obj : main.c make.h dep.h filedef.h variable.h job.h commands.h getopt.h
  124. $(OUTDIR)/misc.obj : misc.c make.h dep.h
  125. $(OUTDIR)/read.obj : read.c make.h dep.h filedef.h job.h commands.h variable.h glob/glob.h
  126. $(OUTDIR)/remake.obj : remake.c make.h filedef.h job.h commands.h dep.h
  127. $(OUTDIR)/remote-stub.obj : remote-stub.c make.h filedef.h job.h commands.h
  128. $(OUTDIR)/rule.obj : rule.c make.h dep.h filedef.h job.h commands.h variable.h rule.h
  129. $(OUTDIR)/signame.obj : signame.c signame.h
  130. $(OUTDIR)/variable.obj : variable.c make.h dep.h filedef.h job.h commands.h variable.h
  131. $(OUTDIR)/version.obj : version.c
  132. $(OUTDIR)/vpath.obj : vpath.c make.h filedef.h variable.h
  133. $(OUTDIR)/glob.obj : glob/glob.c
  134.     $(CC) $(CFLAGS) /c $?
  135. $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
  136.     $(CC) $(CFLAGS) /c $?
  137. $(OUTDIR)/dirent.obj : w32/compat/dirent.c
  138.     $(CC) $(CFLAGS) /c $?
  139. $(OUTDIR)/pathstuff.obj : w32/pathstuff.c
  140.     $(CC) $(CFLAGS) /c $?
  141.  
  142.